; some common macroses
put16: macro
 ld   hl,\1
 ld   a,\2 & $ff
 ld   [hli],a
 ld   [hl],\2 >> 8
 endm

exdehl: macro
 ld   a,h
 ld   h,d
 ld   d,a
 ld   a,l
 ld   l,e
 ld   e,a
endm

waitvblank: macro
 ldio a,[$41]
 and  2
 jr   nz,@-4
endm